Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcdserver: Restructure storage packages to make place for schema #13198

Merged
merged 5 commits into from
Jul 15, 2021

Conversation

serathius
Copy link
Member

@serathius serathius commented Jul 8, 2021

cc @ptabor

@serathius serathius requested a review from ptabor July 8, 2021 12:30
@serathius serathius force-pushed the bootstrap2 branch 2 times, most recently from 877da56 to 4842288 Compare July 8, 2021 13:10
@serathius serathius changed the title etcdserver: Move server bootstraping to one file etcdserver: Restructure storage packages to make place for schema Jul 9, 2021
@serathius serathius force-pushed the bootstrap2 branch 3 times, most recently from e7d93b5 to 2d472b7 Compare July 12, 2021 09:23
@serathius
Copy link
Member Author

cc @wenjiaswe @jingyih

@gyuho
Copy link
Contributor

gyuho commented Jul 14, 2021

@serathius @ptabor This is pretty big change. What's the context? Also, we need to document this in the CHANGELOG.

@serathius
Copy link
Member Author

serathius commented Jul 14, 2021

@gyuho is renaming package considered a big change (not counting a number of lines changed)? It just an git mv and sed to rename imports.

As for CHANGELOG, what kind of changes we document there? I would expect that changelog should include user facing changes, is renaming package within server package a user facing change? I would expect it true for api package, but not for server. Please let me know if I'm missing something.

Context: We are introducing a versioning of storage as proposed in #13168. To properly version fields stored in bbolt we need to abstract logic that marshals field values into bytes stored in bbolt. This PR moves mvcc package as subpackage of new storage package to create place for higher level abstraction that will be aware of storage version.

Even without storage version effort I think that moving all file manipulation under single package is an improvement to package structure.

@ptabor
Copy link
Contributor

ptabor commented Jul 14, 2021

SGTM. Thank you.
Reviewed and the change is a refactor without any BL changes.

I find the new structure cleaner:

  • /storage/backend (abstraction of bbolt)
  • /storage/mvcc (revisions storage)
  • /storage/schema (remaining metadata (versions, members, leases) stored in bbolt)

Than the current mvcc that mixes both roles.

I also like making the enormous (2700loc): server/etcdserver/server.go smaller

Deferring the decision to @gyuho

@gyuho
Copy link
Contributor

gyuho commented Jul 14, 2021

@serathius

As for CHANGELOG, what kind of changes we document there? I would expect that changelog should include user facing changes, is renaming package within server package a user facing change?

Please update CHANGELOG. We should try to document any changes made to the public packages (unless we move this to internal) -- the package mvcc is used for benchmark tools.

LGTM thanks.

@serathius
Copy link
Member Author

PTAL @gyuho @ptabor

Copy link
Contributor

@lilic lilic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ptabor ptabor merged commit 28f86ee into etcd-io:main Jul 15, 2021
@gyuho
Copy link
Contributor

gyuho commented Jul 15, 2021

lgtm thanks @serathius !

@serathius serathius deleted the bootstrap2 branch June 15, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants